﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Admin.master" AutoEventWireup="true" CodeFile="EDiamond.aspx.cs" Inherits="Admin_Diamond" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    td input[type='text'] {width : 98%}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div class="formBox">
    <h2>Thông tin chi tiết EDiamond</h2>
    <p>
    
        <asp:ListView ID="lvwEDiamond" runat="server" DataKeyNames="DiamondID" 
            DataSourceID="EntityDataSource1" InsertItemPosition="LastItem" 
            oniteminserting="lvwEDiamond_ItemInserting" 
            onitemupdating="lvwEDiamond_ItemUpdating">
            <AlternatingItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label ID="DiamondIDLabel" runat="server" Text='<%# Eval("DiamondID") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TenLabel" runat="server" Text='<%# Eval("Ten") %>' />
                    </td>
                    <td>
                        <asp:Label ID="SoLabel" runat="server" Text='<%# Eval("So") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DuongLabel" runat="server" Text='<%# Eval("Duong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="PhuongLabel" runat="server" Text='<%# Eval("Phuong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="QuanLabel" runat="server" Text='<%# Eval("Quan") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TinhThanhLabel" runat="server" Text='<%# Eval("TinhThanh") %>' />
                    </td>
                     <td>
                       <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Edit" ImageUrl="~/Images/edit.png" Width="25px" />
                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Delete" ImageUrl="~/Images/delete.png" Width="25px" />
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <tr style="">

                    <td>
                        <asp:Label ID="DiamondIDLabel1" runat="server" 
                            Text='<%# Eval("DiamondID") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TenTextBox" runat="server" Text='<%# Bind("Ten") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="SoTextBox" runat="server" Text='<%# Bind("So") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DuongTextBox" runat="server" Text='<%# Bind("Duong") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="PhuongTextBox" runat="server" Text='<%# Bind("Phuong") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="QuanTextBox" runat="server" Text='<%# Bind("Quan") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TinhThanhTextBox" runat="server" 
                            Text='<%# Bind("TinhThanh") %>' />
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButton3" runat="server" CommandName="Update" ImageUrl="~/Images/Save1.png" Width="25px" />
                        <asp:ImageButton ID="ImageButton4" runat="server" CommandName="Cancel" ImageUrl="~/Images/undo1.png" Width="25px" />


                    </td>
                </tr>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" style="">
                    <tr>
                        <td>
                            No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <tr style="">

                    <td>

                    </td>
                    <td>
                        <asp:TextBox ID="TenTextBox" runat="server" Text='<%# Bind("Ten") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="SoTextBox" runat="server" Text='<%# Bind("So") %>' Width="20px"/>
                    </td>
                    <td>
                        <asp:TextBox ID="DuongTextBox" runat="server" Text='<%# Bind("Duong") %>' Width="100px"/>
                    </td>
                    <td>
                        <asp:TextBox ID="PhuongTextBox" runat="server" Text='<%# Bind("Phuong") %>' Width="100px"/>
                    </td>
                    <td>
                        <asp:TextBox ID="QuanTextBox" runat="server" Text='<%# Bind("Quan") %>' Width="70px" />
                    </td>
                    <td>
                        <asp:TextBox ID="TinhThanhTextBox" runat="server" 
                            Text='<%# Bind("TinhThanh") %>' Width="95px"/>
                    </td>
                                        <td>
                        <asp:ImageButton ID="ImageButton3" runat="server" CommandName="Insert" ImageUrl="~/Images/Save1.png" Width="25px" />
                        <asp:ImageButton ID="ImageButton4" runat="server" CommandName="Cancel" ImageUrl="~/Images/undo1.png" Width="25px" />
                    </td>
                </tr>
            </InsertItemTemplate>
            <ItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label ID="DiamondIDLabel" runat="server" Text='<%# Eval("DiamondID") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TenLabel" runat="server" Text='<%# Eval("Ten") %>' />
                    </td>
                    <td>
                        <asp:Label ID="SoLabel" runat="server" Text='<%# Eval("So") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DuongLabel" runat="server" Text='<%# Eval("Duong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="PhuongLabel" runat="server" Text='<%# Eval("Phuong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="QuanLabel" runat="server" Text='<%# Eval("Quan") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TinhThanhLabel" runat="server" Text='<%# Eval("TinhThanh") %>' />
                    </td>
                    <td>       
                        <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Edit" ImageUrl="~/Images/edit.png" Width="25px" />
                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Delete" ImageUrl="~/Images/delete.png" Width="25px" />
                    </td>
                </tr>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="itemPlaceholderContainer" runat="server" border="0" style="" cellpadding="0" cellspacing="0" >
                                <tr runat="server" class="bgAdminTitle">
                                    <th runat="server">
                                        ID</th>
                                    <th runat="server">
                                        Tên</th>
                                    <th runat="server">
                                        Số</th>
                                    <th runat="server">
                                        Đường</th>
                                    <th runat="server">
                                        Phường</th>
                                    <th runat="server">
                                        Quận</th>
                                    <th runat="server">
                                        Tỉnh thành
                                    </th>
                                </tr>
                                <tr ID="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" style="">
                              <asp:DataPager ID="DataPager1" runat="server">
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label ID="DiamondIDLabel" runat="server" Text='<%# Eval("DiamondID") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TenLabel" runat="server" Text='<%# Eval("Ten") %>' />
                    </td>
                    <td>
                        <asp:Label ID="SoLabel" runat="server" Text='<%# Eval("So") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DuongLabel" runat="server" Text='<%# Eval("Duong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="PhuongLabel" runat="server" Text='<%# Eval("Phuong") %>' />
                    </td>
                    <td>
                        <asp:Label ID="QuanLabel" runat="server" Text='<%# Eval("Quan") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TinhThanhLabel" runat="server" Text='<%# Eval("TinhThanh") %>' />
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Edit" ImageUrl="~/Images/edit.png" Width="25px" />
                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Delete" ImageUrl="~/Images/delete.png" Width="25px" />
                    </td>
                </tr>
            </SelectedItemTemplate>
        </asp:ListView>
    
    </p>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=EDiamondEntities1" 
        DefaultContainerName="EDiamondEntities1" EnableFlattening="False" 
        EntitySetName="Diamonds" EnableDelete="True" EnableInsert="True" 
        EnableUpdate="True">
    </asp:EntityDataSource>
</div>


</asp:Content>

